// $Id: platform.hpp 2 2009-09-02 08:47:42Z joseph2002 $
/*
 * Copyright 2008 Joseph Wu
 * Distributed under the Boost Software License, Version 1.0.
 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 *
 * For more information, see http://xpcomplus.sourceforge.net
 */

#if defined(linux) || defined(__linux) || defined(__linux__)
// Linux:
#  define XPCOM_PLATFORM_LINUX

#elif defined(__FreeBSD__) || defined(__NetBSD__) || \
      defined(__OpenBSD__) || defined(__DragonFly__)
// BSD:
#  define XPCOM_PLATFORM_BSD

#elif defined(sun) || defined(__sun)
// Solaris:
#  define XPCOM_PLATFORM_SOLARIS

#elif defined(__sgi)
// SGI Irix:
#  define XPCOM_PLATFORM_IRIX

#elif defined(__hpux)
// HP unix:
#  define XPCOM_PLATFORM_HPUX

#elif defined(__CYGWIN__)
// Cygwin is not win32:
#  define XPCOM_PLATFORM_CYGWIN

#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
// Win32:
#  define XPCOM_PLATFORM_WIN32

#elif defined(__BEOS__)
// BeOS
#  define XPCOM_PLATFORM_BEOS

#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
// MacOS
#  define XPCOM_PLATFORM_MACOS

#elif defined(__IBMCPP__) || defined(_AIX)
// IBM
#  define XPCOM_PLATFORM_AIX

#elif defined(__amigaos__)
// AmigaOS
#  define XPCOM_PLATFORM_AMIGAOS

#elif defined(__QNXNTO__)
// QNX:
#  define XPCOM_PLATFORM_QNXNTO

#else
// Generic Unix
#  if defined(unix) || defined(__unix) || \
      defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
#    define XPCOM_PLATFORM_GENERIC_UNIX
#  endif

#endif
